package com.wang.utils.stack;

import java.util.Stack;

/**
 * @author 10570
 * @date 2021/7/14 23:22
 */
public class TestStack {
    public static void main(String[] args) {
        Stack stack = new Stack();
        stack.add("tom");
        stack.add("marry");
        stack.add("jack");

        //出栈
        while (!stack.empty()){
            System.out.println(stack.pop());
        }
    }
}
